//
//  baseModel.m
//  UI13_作业2豆瓣
//
//  Created by 王阳阳 on 15/12/24.
//  Copyright © 2015年 www.lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "baseModel.h"

@implementation baseModel
 - (instancetype)initWithDic:(NSDictionary *)dic
{
    self = [super init];
    if(self)
    {
        [self setValuesForKeysWithDictionary:dic];
    }
    return self;
}
+ (instancetype)modelWithDic:(NSDictionary *)dic
{
    id m = [[[self class]alloc]initWithDic:dic];
    return m;
}
- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    
}
+(NSMutableArray *)modelHandlerWithArray:(NSArray *)arr
{
    NSMutableArray *marr = [NSMutableArray array];
    for (NSDictionary *dic in arr) {
        id m = [[self class]modelWithDic:dic];
        [marr addObject:m];
    }
    return marr;
}
@end
